# -*- coding: utf-8 -*-

# @Author: Chen Hua
# @Date  : 2019/3/1
# @Desc  : 周开户数据

import sys
import datetime
from db.MySqlConn import DBSession, JobConfig

##链接数据库
session = DBSession()

def update_job_config(job_name, end_date):
    #print(type(end_date))
    #print(type(datetime.datetime.now()))
    jc = JobConfig(job_name=job_name, last_data_at=end_date, last_execute_time=datetime.datetime.now(), job_mode='inc')
    session.merge(jc)
    session.commit()
